import Request from "@/util/request.js";

const apiRequest = new Request();

// 获取已开通的区域
export const getOpenedTreeApi = async () => {
    return await apiRequest.post("/api/system.region/tree", {});
}

// 获取省份列表
export const getProvinceListApi = async () => {

    return await apiRequest.post("/api/system.region/getProvinceList", {});
}

// 获取城市列表
export const getCityListApi = async (data) => {
    return await apiRequest.post("/api/system.region/getChildren", data);
}

// 获取已开放城市列表
export const getOpenedCityListApi = async (data) => {
    return await apiRequest.post("/api/system.region/getOpenedCityList", data);
}

// 开启城市
export const openCityApi = async (data) => {
    return await apiRequest.post("/api/system.region/openCity", data);
}

// 关闭城市
export const closeCityApi = async (data) => {
    return await apiRequest.post("/api/system.region/closeCity", data);
}
